import pandas as pd
from pylab import mpl
mpl.rcParams['font.sans-serif'] = ['Microsoft YaHei']
mpl.rcParams['axes.unicode_minus'] = False

col_name = ['referenceName', 'productColor', 'referenceTime', 'score', 'userClientShow', 'userLevelName','creationTime', 'afterDays']
jd = pd.read_table('/home/xbu/git/co_work/spider/jingdong/dj.txt',sep = '|', names=col_name, encoding='utf-8')
print pd.value_counts(jd.userLevelName)[:10]
buyer = pd.value_counts(jd.userLevelName)
a = buyer.plot(kind='bar')

pd.DataFrame()